"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from . import views

urlpatterns = [
    # 前台首页
    url(r'^$',views.index,name='myhome_index'),

    # 列表页
    url(r'^goods/list/$',views.goodslist,name='myhome_goodslist'),

    # 商品详情页
    url(r'^goods/info/$',views.goodsinfo,name='myhome_goodsinfo'),

    # 前台登录界面
    url(r'^login/$',views.login,name='myhome_login'),
    # 退出
    url(r'^logout/$',views.logout,name='myhome_logout'),

    # 前台注册界面
    url(r'^register/$',views.register,name='myhome_register'),
    
    url(r'^checkPhone/$',views.checkPhone,name='myhome_checkPhone'),
    # 手机验证码
    url(r'^sendmsg/$',views.sendmsg,name='myhome_sendmsg'),   


    # 购物车
    url(r'^cart/$',views.cart,name='myhome_cart'),
    # 商品添加至购物车
    url(r'^cart/add/$',views.cartadd,name='myhome_cartadd'),
    # 购物车中商品的数量和价格修改
    url(r'^cart/edit/$',views.cartedit,name='myhome_cartedit'),
    # 购物车删除某个商品
    url(r'^cart/del/$',views.cartdel,name='myhome_cartdel'),
    # 购物车删除所有商品
    url(r'^cart/alldel/$',views.cartAlldel,name='myhome_cartAlldel'),

    # 支付页面
    url(r'^pay/$',views.pay,name='myhome_pay'),
    # 获取城市数据
    url(r'^get/citys/$',views.getcitys,name='myhome_getcitys'),
    # 收货地址添加
    url(r'^address/add/$', views.addressadd, name='myhome_addressadd'),
    # 收货地址获取
    url(r'^address/list/$',views.addresslist,name='myhome_addresslist'),
    # 默认地址的修改
    url(r'^address/edit/$',views.addressedit,name='myhome_addressedit'),
    # 删除单击的收货地址
    url(r'^address/del/$',views.addressdel,name='myhome_addressdel'),



    # 订单创建成功
    url(r'^order/create/$',views.ordercreate,name='myhome_ordercreate'),
    # 订单支付
    url(r'^order/buy/$', views.orderbuy, name='myhome_orderbuy'),


    # 个人中心页面
    url(r'^person/$',views.person,name='myhome_person'),
    # 个人信息页面
    url(r'^person/info/$',views.personinfo,name='myhome_personinfo'),
    # 个人信息修改提交
    url(r'^person/info/edit/$',views.personinfoedit,name='myhome_personinfoedit'),


    # 个人收货地址
    url(r'^person/address/$',views.personaddress,name='myhome_personaddress'),
    # 修改个人收货地址
    url(r'^person/address/edit/$',views.personaddressedit,name='myhome_personaddressedit'),

    # 修改后信息传递
    url(r'^person/address/edit/after/$',views.editaddress,name='myhome_editaddress'),

    # 个人订单管理
    url(r'^person/order/$',views.personorder,name='myhome_personorder'),


]
